package com.dhcc.springboot.test.service.impl;

import com.dhcc.springboot.test.bean.User;
import com.dhcc.springboot.test.mapper.UserMapper;
import com.dhcc.springboot.test.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: test
 * @description: UserService实现类
 * @author: liu denghui
 * @create: 2019/08/13 09:41
 */
@Service
public class UserServiceImpl implements UserService {

    // @Autowired注解，将dao层注入service层
    @Autowired
    UserMapper userMapper;
    @Override
    public int deleteByPrimaryKey(Integer id) {
        return userMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(User record) {
        return userMapper.insert(record);
    }

    @Override
    public int insertSelective(User record) {
        return userMapper.insertSelective(record);
    }

    @Override
    public User selectByPrimaryKey(Integer id) {
        return userMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(User record) {
        return userMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(User record) {
        return userMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<User> queryByUser(User record) {
        return userMapper.queryByUser(record);
    }

    @Override
    public int deleteByPrimaryKeys(String ids) {
        return userMapper.deleteByPrimaryKeys(ids);
    }
}
